# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-dbus
_pkgname=dbus-python
pkgver=1.2.16
pkgrel=2
pkgdesc="Python3 bindings for DBUS"
url="http://www.freedesktop.org/wiki/Software/DBusBindings"
arch="all"
license="MIT"
depends="python3"
depends_dev="py3-dbus"
makedepends="dbus-glib-dev python3-dev py3-sphinx py3-sphinx_rtd_theme"
checkdepends="bash dbus py3-gobject3 py3-tappy"
subpackages="$pkgname-dev $pkgname-doc"
source="https://dbus.freedesktop.org/releases/dbus-python/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-dbus" # Backwards compatibility
provides="py-dbus=$pkgver-r$pkgrel" # Backwards compatibility


build() {
	python3 setup.py build
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-documentation \
		PYTHON_VERSION=3
	make
}

check() {
	make check
}

package() {
	python3 setup.py install --skip-build --prefix=/usr --root="$pkgdir"
	make DESTDIR="$pkgdir" install
}

sha512sums="e76c00c5fd3fe6884e4c24f258987fd3b80d21bd4e0f96aa8fda152078a860b62321324f6efcbfe7226d5ab2521a14b5bda7cf2468d2cae5f376c124a71aa05c  dbus-python-1.2.16.tar.gz"
